<?php

namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Str;
use Laravel\Sanctum\HasApiTokens;
use App\Scopes\IsDelScope;

class PushModel extends BaseModel {

    protected static function booted()
    {
        parent::booted();
    }

    protected $table = "dtrd_ent_shc_rd_product_push";
    protected $primaryKey = "data_id";
    public $incrementing = false;
    protected $keyType = 'string';

    const CREATED_AT = 'create_time';
    const UPDATED_AT = null;

    protected $hidden = ['is_del'];
    protected $fillable = [];

    public function getUsePriceAttribute($value)
    {
        $newValue = Str::snake($value);
        return str_replace('_format', '', $newValue);
    }

}
